package com.wiim.common;


import com.wiim.ui.DanhSachFragment;
import com.wiim.ui.DoiThuongFragment;
import com.wiim.ui.HomeFrament;
import com.wiim.ui.QRCodeFrament;
import com.wiim.ui.DiaDiemFragment;
import com.wiim.ui.ThongTinTkFragment;

import android.support.v4.app.Fragment;

public class FragmentFactory {

	public static Fragment getFragmentByKey(final int key) {
		/**
		 * All class in app will int below with key_value and return Fragment by
		 * name class fragment
		 */
		switch (key) {
		case ConstantValue.HOME:
			return new HomeFrament();
		case ConstantValue.QRCODE_FRAGMENT:
			return new QRCodeFrament();
		case ConstantValue.DIADIEM_FRAGMENT:
			return new DiaDiemFragment();
		case ConstantValue.DANHSACH_FRAGMENT:
			return new DanhSachFragment();
		case ConstantValue.DOITHUONG_FRAGMENT:
			return new DoiThuongFragment();
		case ConstantValue.THONGTIN_TK_FRAGMENT:
			return new ThongTinTkFragment();
		default:
			return null;
		}
	}

}
